<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/pages/common/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="./css/public.css" media="all"/>
    <link rel="stylesheet" href="./css/commonStyle.css" media="all"/>
    <link rel="stylesheet" href="./css/clusterConfig.css" media="all"/>
    <title>集群配置</title>
</head>
<body>
<!--展示当前路径-->
<div class="layui-row background_white visitPathDiv" style="padding-bottom: 10px;">
    <div class="visitPath"></div>
</div>
<div class="layui-tab spare_bottom" lay-filter="demo" style="background: #FFFFFF;margin-top: 0px;">
    <ul class="layui-tab-title">
        <li class="layui-this">地区节点</li>
        <li>指定入口</li>
        <li>指定中心</li>
    </ul>

    <div class="layui-tab-content layui-row" style="background: #FFFFFF;">
        <!-- 地区配置 -->
        <div class="layui-tab-item layui-show">
            <div id="areaList" style="padding: 0px 40px;">
                <table id="area_list" lay-filter="area_list"></table>
                <div class="layui-center padding_upDown_space">
                        <button onclick="Clu.addAreaConfig()"
                                class="layui-btn table_default_btn table_default_btn_border save clu-add"
                                lay-filter="systemConfig">新增
                        </button>
                </div>
            </div>
            <div id="add_area" class="table_padding" style="display: none;">
                <form class="layui-form">
                    <table class="layui-table">
                        <colgroup>
                            <col width="25%">
                            <col width="45%">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>参数说明</th>
                            <th>参数值</th>
                            <th>变量名</th>
                            <th>参数说明</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>地区代码</td>
                            <td>

                                <div class="layui-input-inline layui-form" style="width: 30%;padding: 0px;">
                                    <select name="country" id="country" lay-filter="country">
                                        <option value="">请选择国家</option>
                                    </select>
                                </div>
                                <div class="layui-input-inline layui-form" style="width: 30%;padding: 0px;">
                                    <select name="province" id="province" lay-filter="province">
                                        <option value="">请选择省份</option>
                                    </select>
                                </div>
                                <div class="layui-input-inline layui-form" style="width: 30%;padding: 0px;">
                                    <select name="city" id="city" lay-filter="city">
                                        <option value="">请选择城市</option>
                                    </select>
                                </div>

                            </td>
                            <td>area</td>
                            <td></td>
                        </tr>
                        <tr>
                            <td>地区名称</td>
                            <td>
                                <input type="hidden" id="area_id" class="layui-input id">
                                <input type="text" id="inputAdreeName" class="layui-input name"
                                       style="width: 91.3%;"
                                       placeholder="请输入地区名称">
                            </td>
                            <td>name</td>
                            <td></td>
                        </tr>
                        </tbody>
                    </table>

                    <div class=" layui-center">
                        <div class="layui-input-block padding_upDown_space">
                            <button lay-submit="" lay-filter="systemConfig"
                                    class="layui-btn btnSpace_right motif_button_style"
                                    type="button" onclick="Clu.commit_areaConfig()">保存
                            </button>
                            <button class="layui-btn default_button_style" type="button" onclick="Clu.back()">返回
                            </button>
                        </div>
                    </div>
                </form>
            </div>
        </div>

        <!-- 入口配置 -->
        <div class="layui-tab-item">
            <div id="urlConfigList" style="padding: 47px 47px 17px 47px;">
                <table class="layui-table layui_table_set">
                    <thead>
                    <tr>
                        <th>id</th>
                        <th>服务器类型</th>
                        <th>访问来源地区</th>
                        <th>提供服务地区</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody id="url_tab">
                    </tbody>

                </table>

                <div class=" layui-center">
                    <div class="layui-input-block padding_upDown_space">
                        <button class="layui-btn entranceBtn table_default_btn table_default_btn_border "
                                onclick="Clu.addUrlConfig()" style="margin-bottom: 10px;"
                                lay-filter="systemConfig">新增
                        </button>
                    </div>
                </div>
            </div>
            <form id="addUrlConfig" class="layui-form" style="display: none;padding: 0px 40px;">
                <table class="layui-table mag0">
                    <colgroup>
                        <col width="25%">
                        <col width="45%">
                        <col>
                    </colgroup>
                    <thead>
                    <tr>
                        <th>参数说明</th>
                        <th>参数值</th>
                        <th>变量名</th>
                        <th>参数说明</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <td>服务器类型</td>
                        <td>

                            <select class="layui-select type" lay-filter="type">
                                <option>请选择服务器类型</option>
                                <option id="url_all" value="0">全部类型</option>
                                <option id="url_xmpp" value="1">xmpp服务器</option>
                                <option id="url_http" value="2">http服务器</option>
                                <option id="url_video" value="3">视频服务器</option>
                                <option id="url_live" value="4">直播服务器</option>
                                <option id="url_upload" value="5">上传服务器</option>
                                <option id="url_download" value="6">下载服务器</option>
                                <input type="text" name="" id="urlConfig_id" style="display: none;">
                            </select>
                        </td>
                        <td>type</td>
                        <td></td>
                    </tr>
                    <tr>
                        <td>访问来源地区</td>
                        <td>

                            <select id="fromArea" class="layui-select areaUrlConfig">

                            </select>
                        </td>
                        <td>area</td>
                        <td></td>
                    </tr>

                    <tr>
                        <td>提供服务地区</td>
                        <td>
                            <select id="toArea" class="layui-select areaUrl">

                            </select></td>
                        <td>toArea</td>
                        <td></td>
                    </tr>

                    </tbody>
                </table>
                <div class=" layui-center">
                    <div class="layui-input-block padding_upDown_space">
                        <span class="layui-btn  btnSpace_right motif_button_style" onclick="Clu.commit_urlConfig()"
                              lay-filter="systemConfig">保存</span>
                        <button class="layui-btn  default_button_style" type="button" onclick="Clu.back()">返回</button>
                    </div>
                </div>
            </form>
        </div>

        <!-- 中心服务器 -->
        <div class="layui-tab-item">
            <div id="centerConfigList" style="padding: 47px 47px 17px 47px;">
                <table class="layui-table mag0">
                    <thead>
                    <tr>
                        <th>节点名称</th>
                        <th>服务器类型</th>
                        <th>访问来源地区A</th>
                        <th>访问来源地区B</th>
                        <th>提供服务地区</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody id="center_tab">

                    </tbody>
                </table>
                <div class=" layui-center">
                    <div class="layui-input-block padding_upDown_space">
                        <button class="layui-btn centreBtn table_default_btn table_default_btn_border"
                                onclick="Clu.addCenter()" style="margin-bottom: 10px;"
                                lay-filter="systemConfig">新增
                        </button>
                    </div>
                </div>
            </div>
            <form id="addCenterConfig" class="layui-form" style="display: none;padding: 0px 40px;">
                <table class="layui-table mag0">
                    <colgroup>
                        <col width="25%">
                        <col width="45%">
                        <col>
                    </colgroup>
                    <thead>
                    <tr>
                        <th>参数说明</th>
                        <th>参数值</th>
                        <th>变量名</th>
                        <th>参数说明</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <td>服务器类型</td>
                        <td>
                            <select lay-verify="required" lay-filter="center_type" class="center_type">
                                <option value="">请选择服务器类型</option>
                                <option value="1">xmpp服务器</option>
                                <option value="2">http服务器</option>
                                <option value="3">视频服务器</option>
                                <option value="4">直播服务器</option>
                                <option value="5">上传服务器</option>
                                <option value="6">下载服务器</option>
                                <input type="text" name="" id="center_id" style="display: none;">
                            </select>
                        </td>
                        <td>type</td>
                        <td></td>
                    </tr>
                    <tr>
                        <td>节点名称</td>
                        <td>
                            <input type="text" class="layui-input center_name" lay-verify="required"
                                   placeholder="请输入节点名称">
                        </td>
                        <td>name</td>
                        <td></td>
                    </tr>

                    <tr>
                        <td>访问来源地区A</td>
                        <td>

                            <select lay-verify="required" lay-filter="center_clientA" class="center_clientA">

                            </select>
                        </td>
                        <td>clientA</td>
                        <td></td>
                    </tr>
                    <tr>
                        <td>访问来源地区B</td>
                        <td>

                            <select lay-verify="required" lay-filter="center_clientB" class="center_clientB">

                            </select>
                        </td>
                        <td>clientB</td>
                        <td></td>
                    </tr>
                    <tr>
                        <td>提供服务地区</td>
                        <td>
                            <select class="urlConfigIds" name="list" lay-verify="urlConfigIds">

                            </select>

                        </td>
                        <td>area</td>
                        <td></td>
                    </tr>
                    <tr>
                        <td>状态</td>
                        <td>
                            <!-- <input type="text" class="layui-input status" placeholder=""> -->
                            <select lay-verify="required" class="layui-select center_status">
                                <option id="zc" value="1">正常</option>
                                <option id="jy" value="-1">禁用</option>
                            </select>
                        </td>
                        <td>status</td>
                        <td></td>
                    </tr>
                    </tbody>
                </table>
                <div class=" layui-center">
                    <div class="layui-input-block padding_upDown_space">
                        <span class="layui-btn  btnSpace_right motif_button_style"
                              onclick="Clu.addCenterConfig()">保存</span>
                        <button class="layui-btn  default_button_style" type="button" onclick="Clu.back()">返回</button>
                    </div>
                </div>
            </form>
        </div>

        <!-- 服务器列表 -->
        <div id="server_list" class="layui-tab-item table_padding" style="display: none;">
            <div id="server_tab">
                <table id="ServerList" cellspacing="0" cellpadding="0" border="0" class="layui-table">
                    <thead>
                    <tr>
                        <th>id</th>
                        <th>机器名称</th>
                        <th>服务器地址</th>
                        <th>端口</th>
                        <th>当前人数</th>
                        <th>人数上限</th>
                        <th>地区</th>
                        <th>服务器类型</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody id="server_tbody">

                    </tbody>
                </table>
                <div class=" layui-center">
                    <div class="layui-input-block padding_upDown_space">
                        <button onclick="Clu.addServer()" class="layui-btn save motif_button_style"
                                lay-submit=""
                                lay-filter="systemConfig">添加
                        </button>
                        <button class="layui-btn  default_button_style" type="button" onclick="Clu.back()">返回</button>
                    </div>
                </div>
            </div>
            <div id="server_add" style="display: none;">
                <input id="server_Id" type="" name="" style="display: none;">
                <input id="addServerArea" type="" name="" style="display: none">
                <form class="layui-form">
                    <table class="layui-table mag0">
                        <colgroup>
                            <col width="25%">
                            <col width="45%">
                            <col>
                        </colgroup>
                        <thead>
                        <tr>
                            <th>参数说明</th>
                            <th>参数值</th>
                            <th>变量名</th>
                            <th>参数说明</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>机器名称</td>
                            <td>
                                <input type="text" class="layui-input add_id" style="display: none">
                                <input type="text" class="layui-input add_name" lay-verify="required"
                                       placeholder="请输入机器名称">

                            </td>
                            <td>name</td>
                            <td></td>
                        </tr>
                        <tr>
                            <td>服务器地址</td>
                            <td>
                                <input type="text" class="layui-input add_url" lay-verify="required"
                                       placeholder="请输入服务器地址">
                            </td>
                            <td>url</td>
                            <td></td>
                        </tr>
                        <tr>
                            <td>地区</td>
                            <td>
                                <select class="serverAdd_area">

                                </select>
                            </td>
                            <td>area</td>
                            <td></td>
                        </tr>

                        <tr>
                            <td>端口</td>
                            <td><input type="text" class="layui-input add_port" placeholder="请输入端口"></td>
                            <td>port</td>
                            <td></td>
                        </tr>
                        <tr>
                            <td>当前人数</td>
                            <td><input type="text" class="layui-input add_count" placeholder=""></td>
                            <td>count</td>
                            <td></td>
                        </tr>
                        <tr>
                            <td>人数上限</td>
                            <td><input type="text" class="layui-input add_maxPeople" placeholder=""></td>
                            <td>maxPeople</td>
                            <td></td>
                        </tr>

                        <tr>
                            <td>服务器类型</td>
                            <td>
                                <select class="add_type">
                                    <option value="1">xmpp服务器</option>
                                    <option value="2">http服务器</option>
                                    <option value="3">视频服务器</option>
                                    <option value="4">直播服务器</option>
                                    <option value="5">上传服务器</option>
                                    <option value="6">下载服务器</option>
                                </select>
                            </td>
                            <td>type</td>
                            <td></td>
                        </tr>
                        <tr>
                            <td>状态</td>
                            <td>

                                <select class="layui-select add_status">
                                    <option value="">状态</option>
                                    <option id="server_add_zc" value="1">正常</option>
                                    <option id="server_add_jy" value="-1">禁用</option>
                                </select>
                            </td>
                            <td>status</td>
                            <td></td>
                        </tr>
                        </tbody>

                    </table>
                </form>

                <div class=" layui-center">
                    <div class="layui-input-block padding_upDown_space">
                        <button class="layui-btn  btnSpace_right motif_button_style" type="button"
                                onclick="Clu.commitAddServer()">
                            保存
                        </button>
                        <button class="layui-btn  default_button_style" type="button" onclick="Clu.back()">返回</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/html" id="areaList_toolbar">
    <a class="layui-btn table_default_btn layui-btn-xs delete " lay-event="delete">删除</a>
    <a class="layui-btn table_default_btn layui-btn-xs update" lay-event="update">修改</a>
    <a class="layui-btn table_default_btn layui-btn-xs serverList" lay-event="serverList">服务器群</a>
</script>

<script type="text/javascript" src="/pages/common/jquery/jquery.min.js"></script>
<script type="text/javascript" src="/pages/console/assets/xss-filters.1.2.7.min.js"></script>
<script type="text/javascript" src="/pages/common/layui/layui.all.js"></script>
<script type="text/javascript" src="/pages/assets/js/jquery.md5.js"></script>
<script type="text/javascript" src="./js/common.js"></script>
<script type="text/javascript" src="./js/console_ui.js"></script>
<script type="text/javascript" src="/pages/console/js/addr.js"></script>
<script type="text/javascript" src="/pages/console/js/authorityManagement.js"></script>
<script type="text/javascript" src="/pages/console/js/clusterConfig.js"></script>
</body>
</html>